<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>主页</title>
    <link rel="stylesheet" th:href="@{/static/layui/css/layui.css}"/>
    <link rel="stylesheet" th:href="@{/static/layui/css/index.css}">
</head>
<body>

<button id="getweather">北京天气</button>

<div>
    <a href="#">获取所有用户</a>

    <button class="but"><a th:href="@{'/addUser'}">添加用户</a></button>
    <table class="layui-table">
        <colgroup>
            <col width="150">
            <col width="200">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th>ID</th>
            <th>姓名</th>
            <th>密码</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="user:${users}">
            <td th:text="${user.id}"></td>
            <td th:text="${user.name}"></td>
            <td th:text="${user.password}"></td>
            <td><a th:href="@{'/updateUser/'+${user.id}}">修改</a></td>
            <td><a th:href="@{'/delUser/'+${user.id}}">删除</a></td>
        </tr>
        </tbody>
    </table>
</div>
<script type="text/javascript" th:src="@{/static/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/static/layui/index.js}"></script>
</body>
</html>
